var tgd = tgd || {};
tgd.Simulations = tgd.Simulations || {};
tgd.Simulations.Zombies = tgd.Simulations.Zombies || {};

tgd.Simulations.Zombies.HumanBrain = function (physics, vision, id) {
	var _p = physics;
	var _v = vision;
	var _i = id;

	//this.ID getter = function() { return _i; }
	this.ID = _i;

	// @return { Type, Position? : { X, Y } /* move */, Person /* attack */ }
	this.think = function() {
		var retVal = {};
		var results = _v.getVision();

		//todo: could make this smarter, i.e. go away from all zombies, not just first.  or make them mill around.
		if (results.Zombies.length != 0) {
			retVal.Position = {X : results.Zombies[0].Position.X * -1, Y : results.Zombies[0].Position.Y * -1};
			retVal.Type = tgd.Simulations.Zombies.Enums.ActionType.Move;
		} else {
			retVal.Type = tgd.Simulations.Zombies.Enums.ActionType.Nothing;
		}

		return retVal;
	}
}
